#ifndef _OD_SIP_GJB_XML_CMD_DECINE_H_
#define _OD_SIP_GJB_XML_CMD_DECINE_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "od_trace.h"
#include "param_xml.h"

/*GJB1.0 PTZ ctrl string define*/
#define GJB_START                        "start"
#define GJB_STOP                         "stop"
#define GJB_HOME                         "home"
#define GJB_ZOOMIN                       "in"
#define GJB_ZOOMOUT                      "out"
#define GJB_FOCUSFAR                     "far"
#define GJB_FOCUSNEAR                    "near"
#define GJB_DIRECTION_UP                 "u"
#define GJB_DIRECTION_UPLEFT             "ul"
#define GJB_DIRECTION_UPRIGHT            "ur"
#define GJB_DIRECTION_DOWN               "d"
#define GJB_DIRECTION_DOWNLEFT           "dl"
#define GJB_DIRECTION_DOWNRIGHT          "dr"
#define GJB_DIRECTION_LEFT               "l"
#define GJB_DIRECTION_RIGHT              "r"
#define GJB_APERTUREUP                   "+"
#define GJB_APERTUREDOWN                 "-"
#define GJB_POINTINDEXOPERATION_ADD      "add"
#define GJB_POINTINDEXOPERATION_SET      "invoke"
#define GJB_POINTINDEXOPERATION_REMOVE   "remove"


typedef struct 
{
    char direction[32];
    int speed;
}tiltservo;

typedef struct 
{
    char direction[32];
    int speed;
}panservo;

typedef struct 
{
    char zoomctrl[32];
    int speed;
}zoom;

typedef struct 
{
    char focusctrl[32];
    int speed;
}focus;

typedef struct 
{
    char aperturectrl[32];
    int speed;
}aperture;


/*云镜控制*/
typedef struct
{
    char    commandname[32];    //ptzctrl
    char    operation[16];      //操作类型start/stop
    char    seq[64];            //操作序列号值
    char    ts[32];             
    char    devname[32];        //设备名称
    char    devid[16];          //设备ID
    
    tiltservo tilt;             //云台垂直运动控制(可选)
    panservo pan;               //云台水平运动控制（可选）
    zoom zoom;                  //镜头变倍控制（可选）
    focus focus;                //聚焦远近控制（可选）
    aperture aperture;          //光圈放大缩小控制（可选）
}ptzctrl;

/*预置位操作*/
typedef struct
{
    char    commandname[32];        //pointindexoperation
    char    operation[16];          //操作类型 add,remove,invoke
    char    seq[64];                //操作序列号值
    char    ts[32];                 
    char    devname[32];            //设备名称
    char    devid[16];              //设备ID
    
    char    pointindexname[32];     //预置位名称
    int     pointindexvalue;        //预置位索引值
}ptzposition;

/*获取命令类型*/
typedef struct 
{
    char    commandname[32];
}msg_request;

/*I帧间隔设置参数*/
typedef struct
{
    char    commandname[32];
    char    seq[64];
    char    ts[32];
    char    devname[32];
    char    devid[16];

    char    iframedelta[8]; //有效参数,I帧间隔,以ms为单位
}msg_iframeconfreq;


typedef struct
{
    char    Index[16];
    char    Show[16];
    char    Left[16];
    char    Top[16];
    char    FontName[16];
    char    FontSize[16];
    char    Color[16];
    char    Text[64];
}msg_osd;


/**
* 多行字幕
*/
typedef struct
{
    int array_size;
    msg_osd osd[8];
}msg_osd_multi;

typedef struct
{
    char    commandname[32];
    char    seq[64];
    char    ts[32];
    char    devname[32];
    char    devid[16];
    char    customtype[32];
    char    customdata[128];
}msg_osd_customosd;


typedef struct
{
    char    commandname[32];
    char    seq[64];
    char    response[32];
    char    ts[32];
}msg_response;

typedef struct
{
    char    commandname[32];
    char    seq[64];
    char    ts[32];
    char    devname[32];
    char    devid[16];
}msg_header;


extern struct pdesc ptzctrl_params[12];
extern struct pdesc ptzposition_params[9];
extern struct pdesc cmd_name[2];
extern struct pdesc iframeconfreq_params[7];
extern struct pdesc msgosd_params[9];
extern struct pdesc msghdr_params[6];
extern struct pdesc response_params[5];
extern struct pdesc msg_customosd_params[8];


#ifdef __cplusplus
    }
#endif

#endif

/*_*/

